package com.gimi.cloud.jimi.dao.dao.userInfo;

import com.gimi.cloud.jimi.dao.myMapper.MyMapper;
import com.gimi.cloud.jimi.dto.core.ApiConfigDTO;
import com.gimi.cloud.jimi.entity.core.ApiConfig;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ApiConfigDao extends MyMapper<ApiConfig> {

    @Select("SELECT * FROM sys_api_config WHERE nid = #{nid} LIMIT 1")
    ApiConfig getApiConfigByKey(@Param(value = "nid")String nid);

    @Select("SELECT * FROM sys_api_config WHERE `status` = 1;")
    List<ApiConfigDTO> getApiConfigList();

    @Select("SELECT * FROM sys_api_config WHERE `status` = 1;")
    List<ApiConfig> getValidateApi();
}

